﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.ServiceModel.Web;
using AddonService.DTO;

namespace AddonService
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IAnnotService" in both code and config file together.
    [ServiceContract]
    public interface IAnnotService
    {
        [OperationContract]
        [WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json, UriTemplate = "/AddAnnotation")]
        string AddNewAnnotation(Annotation annotation);

        [OperationContract]
        [WebGet(ResponseFormat = WebMessageFormat.Json, UriTemplate = "/GetAnnotations")]
        List<Annotation> GetAllAnnotations();
        
        [OperationContract]        
        [WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json, UriTemplate = "/DeleteAnnotations")]
        string DeleteAnnotation(DeleteUrl Url);

    }

    public class DeleteUrl
    {
        public string url { get; set; }
    }
}
